<script setup>
import { NRadioGroup, NRadioButton } from 'naive-ui'

defineProps({
  filterType: String
})
defineEmits(['update:filterType'])
</script>

<template>
  <n-radio-group
      :value="filterType"
      @update:value="val => $emit('update:filterType', val)"
      class="filter-group"
  >
    <n-radio-button value="all">全部</n-radio-button>
    <n-radio-button value="active">未完成</n-radio-button>
    <n-radio-button value="completed">已完成</n-radio-button>
  </n-radio-group>
</template>

<style scoped>
.filter-group {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
</style>
